<template>
  <ex_super_dialog_form ref="applyPayDialog" v-bind="option" v-on="$listeners" @afterSubmitSuccess="afterSubmitSuccess">
  </ex_super_dialog_form>
</template>

<script>
export default {
  components: {},
  props: {},
  data() {
    return {
      option: {
        customClass: "dialog_auto",
        submitDataHandle: (data) => {
          return { id: data.id };
        },
        form: {
          itemClass: "form_item_default",
          inputClass: "form_input_default",
          model: [
            {
              key: "code",
              label: "label_purchase_order_code",
              formType: 'text'
            },
            {
              key: "totalAmount",
              label: "label_payment_amount",
              formType: 'text'
            },
            // {
            //   key: "remark",
            //   label: "label_remark",
            //   attrs: {
            //     type: "textarea",
            //   },
            // }
          ],
        }
      },
    };
  },
  watch: {},

  created() { },
  mounted() { },
  methods: {
    show(data, title) {
      console.log(data)
      this["$refs"]["applyPayDialog"].showNew({
        title: title,
        submitUrl: '/oms-api/purchase/OmsPurchaseOrderPaymentRpc/apply.json',
        data: data
      });
    },
    close() {
      this.$refs.form.resetFields();
      this.$emit("close");
    },
    afterSubmitSuccess() {
      this.$emit("submit");
    },
  },
};
</script>

<style lang="less" scoped></style>
